from typing import Any

from recruit_bot.api.base import AbstractRequests
from recruit_bot.api.exceptions import HTTPException
from recruit_bot.models.user import UserCreate


class UserAPI:
    async def create_user(
            self,
            user: UserCreate,
            requests: AbstractRequests,
            url: str
    ) -> dict[str, Any]:
        try:
            return await requests.post(url, vars(user))
        except HTTPException:
            pass
